Keyword- and Default- Parameters in JAVA
نویسندگان
چکیده
Overloading is a highly controversial programming language mechanism by which different methods of the same class are allowed to bear the same name. Despite the criticism, JAVA programmers make extensive use of this mechanism—not just because it is available, but also because the language does not provide an alternative for defining multiple constructors, and because it is useful for expressing similarity of services provided by a class. In a previous paper we argued that more than 60% of the overloading cases are “justifiable” and that in 35% of the cases overloading is used for emulating a default arguments mechanism. Based on these results, this paper argues that most “justifiable” uses of overloading are better done with a combination of keyword parameters and default parameters parameter definition mechanisms, and describes our extension of the JAVA compiler which adds these two features to the language.
منابع مشابه
V m Enhancements to the Language
V W enhances w by providing support for scalable fonts and thus achieving true device independence. V m turns w into a compact system (less than 10% of the size of traditional W ) , supports a printer driver definition language, supplements the T ) $ system with a number of new high-quality scalable typefaces, implements a variety of font effects (compression, shade, outline, shadow). Support o...
متن کاملLocation Reparameterization and Default Priors for Statistical Analysis
This paper develops default priors for Bayesian analysis that reproduce familiar frequentist and Bayesian analyses for models that are exponential or location. For the vector parameter case there is an information adjustment that avoids the Bayesian marginalization paradoxes and properly targets the prior on the parameter of interest thus adjusting for any complicating nonlinearity the details ...
متن کاملInterfaces with default implementations in Java
With the interface construct, Java features a concept with high potential for producing reusable code: Java’s interfaces allow the definition of class properties independently of class inheritance. We propose an extension of Java for providing default implementations in interfaces. Default implementations are useful since they reduce the effort required to implement an interface. They are espec...
متن کاملSubsynchronous Resonance Damping Using SMES Optimized by Quantum Behaved Particle Swarm Optimization
Subsynchronous resonance (SSR) problems appeared due to resonance between the turbine and the series capacitor on transmission line is damped by installing superconducting magnetic energy storage (SMES) unit which the parameters are optimized by quantum behaved particle swarm optimization (QPSO). The proposed objective function is comprehensive damping index (CDI) of SSR damping. To accommodate...
متن کاملKeyword and Optional Arguments in PLT Scheme
The lambda and procedure-application forms in PLT Scheme support arguments that are tagged with keywords, instead of identified by position, as well as optional arguments with default values. Unlike previous keyword-argument systems for Scheme, a keyword is not self-quoting as an expression, and keyword arguments use a different calling convention than non-keyword arguments. Consequently, a key...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- Journal of Object Technology
دوره 11 شماره
صفحات -
تاریخ انتشار 2012